package com.cs543.j.client.cloudService;

public enum CloudRequestCode {

	LOOKUP("lookup"), READ("read"), UPLOAD("upload"), DELETE("delete"), COPY("copy"), MOVE("move"), RENAME("rename"), MAKEDIR("makedir");

	private String code;

	private CloudRequestCode(String code) {
		this.code = code;
	}

	@Override
	public String toString() {
		return this.code;
	}

	public static String[] toStringArray() {
		String[] result = new String[values().length];
		for (int i = 0; i < result.length; i++) {
			result[i] = values()[i].toString();
		}
		return result;
	}

	public boolean equals(String target) {
		return this.toString().equals(target);
	}

}
